import {createApp} from 'vue'
import App from './App.vue'
import {pinia} from './stores'
import {router} from './router'
import {useAuthStore} from '@/stores/modules/auth'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
import 'dayjs/locale/zh-cn'
import '@/assets/styles/global.scss'

const app = createApp(App)
app.use(pinia)
app.use(router)
app.use(Antd)

// 初始化认证状态（在挂载前）
const auth = useAuthStore()
auth.initAuth().finally(() => {
    app.mount('#app')
})
